﻿

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using CommonTagTime.DataAccess;
using CommonTagTime.ModelObject;
namespace CommonTagTime.Business
{
    public class busCustomer
    {
        //------------------------------------------------
        //FIELD TABLE
        //------------------------------------------------

        public const string CUSTOMERID = "CustomerId";
        public const string ISACTIVE = "IsActive";
        public const string NAME = "Name";
        public const string ORDERDIRECTION = "OrderDirection";
        public const string CURRENTPAGE = "CurrentPage";
        public const string PAGESIZE = "PageSize";
        public const string TOTALRECORDS = "TotalRecords";
        public const string CONDITION = "Condition";
        private daoCustomer _daoCustomer;
        //------------------------------------------------
        //PUBLIC
        //------------------------------------------------
        public busCustomer()
        {
            _daoCustomer = new daoCustomer();
        }
        public CustomerCollection List(Customer customer)
        {
            return _daoCustomer.List(customer);
        }
        public CustomerCollection GetAll()
        {
            return _daoCustomer.ListAll();
        }
        public Customer GetById(int customerId)
        {
            return _daoCustomer.GetById(customerId);
        }
        public bool Active(int categoryID)
        {
            return _daoCustomer.Active(categoryID);
        }
        public bool DeActive(int categoryID)
        {
            return _daoCustomer.DeActive(categoryID);
        }
        public bool Delete(int categoryID)
        {
            return _daoCustomer.Delete(categoryID);
        }
        public int Insert(Customer objData)
        {
            return _daoCustomer.Insert(objData);
        }
        public int Update(Customer objData)
        {
            return _daoCustomer.Update(objData);
        }
    }

}